<?php
/**
 * Created by PhpStorm.
 * User: Da Xiong
 * Date: 2018/11/24
 * Time: 17:10
 */

namespace App\Http\Controllers\Api;


use App\Http\Controllers\Controller;

class UserController extends Controller
{
    /**
     * 登录用户详情
     * @param Request $request
     * @return \Illuminate\Http\JsonResponse
     */
    public function user(){
        try {
            $user = auth()->guard('api')->user();
            return $this->returnJson(0,'',$user);
        } catch (\Exception $e) {
            return $this->returnJson(1, '网络超时，请刷新再试');
        }
    }
}